package edu.spec.rxz.week08.homework.D3t;

public class person {
    String name; String sex; int age; public String getName() {
        return name;
    } public void setName(String name) {
        this.name = name;
    } public String getSex() {
        return sex;
    } public void setSex(String sex) {
        this.sex = sex;
    } public int getAge() {
        return age;
    } public void setAge(int age) {
        this.age = age;
    }

    public String toString(){
        return null;
    } public person(String name, String sex, int age) {
        this.name = name;
        this.sex = sex;
        this.age = age;
    } }//子类
public class Student extends person {
    long number;
    int sx;
    int yy;
    int yw;
    public long getNumber() {
        return number;
    }
    public void setNumber(long number) {
        this.number = number;
    }
    public int getMath() {
        return sx;
    }
    public void setMath(int sx) {
        this.sx = sx;
    }
    public int getYy() {
        return yy;
    }
    public void setEng(int yy) {
        this.yy = yy;
    }
    public int getYw() {
        return yw;
    }
    public void setComp(int yw) {
        this.yw = yw;
    } public Student(String name, String sex, int age, long number, int sx,
                     int yy, int yw) {
        super(name, sex, age);
        this.number = number;
        this.sx = sx;
        this.yy = yy;
        this.yw = yw;
    }
    public double aver(){
        return (sx+yy+yw)/3;
    }
    public int max(){
        return Math.max(Math.max(sx, yy), yw);
    }
    public int min(){
        return Math.min(Math.min(sx, yy), yw);
    }
    public String toString(){
        return null;
    }
}
//测试程序
public class test {
    public static void main(String args[]){
        Student s = new Student("饶小竺","女",18,1713630017,80,95,85);
        System.out.print("学号："+s.getNumber());
        System.out.print("姓名："+s.getName());
        System.out.print("性别："+s.getSex());
        System.out.print("年龄："+s.getAge());
        System.out.print("平均分："+s.aver());
        System.out.print("最高分："+s.max());
        System.out.print("最低分："+s.min());
    }
}